package utils
{
	import flash.display.Sprite;

	public class Button extends Component
	{
		public function Button(text:String)
		{
			var cover:Sprite = new Sprite();
			var label:Label = new Label(text);
			trace(label.width);
			label.x = 5;
			label.y = 4;
			addChild(label);
			
			graphics.lineStyle(1, 0x000000);
			graphics.beginFill(0xFFFFFF);
			graphics.drawRect(0, 0, label.width + 10, 25);
			graphics.endFill();
			
			cover.graphics.beginFill(0xEEEEEE, 0.01);
			cover.graphics.drawRect(0, 0, label.width + 10, 25);
			cover.graphics.endFill();
			
			addChild(cover);
			
			buttonMode = true;
		}
	}
}